﻿#include "OperFESensors.h"

#include "OperatorsInterface/GraphEventOperator.h"
#include "updateBrowserTable.h"

namespace ModelOper
{
    bool OperFESensors::execGUI()
    {
        return false;
    }

    bool OperFESensors::execProfession()
    {
        return false;
    }

    void OperFESensors::editSubsystem(const int feID)
    {
        if (!_seaMgr)return;
        QWidget* mw = FITKAPP->getGlobalData()->getMainWindow();
        //编辑对话框
        QObject object;
        object.setObjectName("actionEditFESensor");
        Core::FITKActionOperator* oper = Core::FITKOperatorRepo::getInstance()->getOperatorT<Core::FITKActionOperator>("actionEditFESensor");
        if (!oper) return;
        oper->setArgs("DataID", feID);
        oper->setEmitter(&object);
        oper->actionTriggered();
        //刷新表格
        ModelOper::updateBrowserTable();
    }

    void OperFESensors::removeSubsystem(const int feID)
    {
        //刷新表格
        ModelOper::updateBrowserTable();
    }

    void OperFESensors::setAttribute(const QString & name, const QString & text, const int attrIndex, const QList<int>& feIDs)
    {
    }

}